<?php $nb1 = count($book); $j = 0; foreach ($book as $key => $value): ++$j ?>"<?php echo $key ?>": <?php echo json_encode($value).($nb1 == $j ? '' : ',') ?><?php endforeach ?>
